Identify and fix JavaScript errors without error console